import http from "@/utils";

class Teacher {
  // 获取列表  必传module 为module接口里的code
  getList(reload) {
    let url = "/teacher/index";
    return http.get(url, reload);
  }
  // 新增
  createContent(reload) {
    let url = "/teacher/create";
    return http.post(url, reload);
  }

  // 编辑
  editContent(reload) {
    let url = "/teacher/edit";
    return http.post(url, reload);
  }

  // 详情 detail 参数 id
  getContentDetail(reload) {
    let url = "/teacher/detail";
    return http.get(url, reload);
  }

  // 删除
  deleteContent(reload) {
    let url = "/teacher/delete";
    return http.post(url, reload);
  }

  // 更新唯一字段
  updateOnlyfield(reload) {
    let url = "/teacher/onlyfield";
    return http.post(url, reload);
  }

  // 权限角色 role 用于下拉
  getRole(reload) {
    let url = "/teacher/role";
    return http.get(url, reload);
  }

  // 教师类型 type 用于下拉
  getTeacherType(reload) {
    let url = "/common/get_web_config";
    return http.get(url, reload);
  }

  // 教师授课时长 classinfo
  classInfo(reload) {
    let url = "/teacher/classinfo";
    return http.post(url, reload);
  }
}

export default new Teacher();
